.class public Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;
.super Ljava/lang/Object;
.source "ViewHistory.java"

# interfaces
.implements Lcom/glympse/android/glympse/DlgShell$DlgShellListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewHistory$TicketCell;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "OnExpireDelete"
.end annotation


# instance fields
.field m_fDelete:Z

.field final synthetic this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/ViewHistory$TicketCell;Z)V
    .locals 1
    .parameter
    .parameter "fDelete"

    .prologue
    .line 602
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    .line 599
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 596
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->m_fDelete:Z

    .line 601
    iput-boolean p2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->m_fDelete:Z

    return-void
.end method


# virtual methods
.method public OnCancel(Lcom/glympse/android/glympse/DlgShell;)V
    .locals 0
    .parameter "oDlgShell"

    .prologue
    .line 646
    return-void
.end method

.method public OnDismissed(Lcom/glympse/android/glympse/DlgShell;Z)V
    .locals 0
    .parameter "oDlgShell"
    .parameter "fOk"

    .prologue
    .line 651
    return-void
.end method

.method public OnOk(Lcom/glympse/android/glympse/DlgShell;)V
    .locals 4
    .parameter "oDlgShell"

    .prologue
    .line 607
    iget-boolean v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->m_fDelete:Z

    if-eqz v1, :cond_3

    .line 609
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    iget-object v1, v1, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->m_oTicket:Lcom/glympse/platform/common/Ticket;

    if-eqz v1, :cond_0

    .line 611
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    iget-object v2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    iget-object v2, v2, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->m_oTicket:Lcom/glympse/platform/common/Ticket;

    iget-wide v2, v2, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    invoke-virtual {v1, v2, v3}, Lcom/glympse/platform/common/ServerPost;->AddDeleteTicket(J)Z

    .line 612
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v1}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    .line 613
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oSentTickets:Lcom/glympse/platform/common/SentTicketList;

    iget-object v1, v1, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    iget-object v2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    iget-object v2, v2, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->m_oTicket:Lcom/glympse/platform/common/Ticket;

    invoke-virtual {v1, v2}, Lcom/glympse/platform/GVector$Tickets;->remove(Ljava/lang/Object;)Z

    .line 615
    :cond_0
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v1

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory;->access$13(Lcom/glympse/android/glympse/ViewHistory;)Ljava/util/ArrayList;

    move-result-object v1

    if-eqz v1, :cond_1

    .line 617
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v1

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory;->access$13(Lcom/glympse/android/glympse/ViewHistory;)Ljava/util/ArrayList;

    move-result-object v1

    iget-object v2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 619
    :cond_1
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v1

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory;->access$15(Lcom/glympse/android/glympse/ViewHistory;)Lcom/glympse/android/glympse/ViewHistory$TicketAdapter;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 621
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$4(Lcom/glympse/android/glympse/ViewHistory$TicketCell;)Lcom/glympse/android/glympse/ViewHistory;

    move-result-object v1

    invoke-static {v1}, Lcom/glympse/android/glympse/ViewHistory;->access$15(Lcom/glympse/android/glympse/ViewHistory;)Lcom/glympse/android/glympse/ViewHistory$TicketAdapter;

    move-result-object v1

    iget-object v2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-virtual {v1, v2}, Lcom/glympse/android/glympse/ViewHistory$TicketAdapter;->remove(Ljava/lang/Object;)V

    .line 641
    :cond_2
    :goto_0
    return-void

    .line 626
    :cond_3
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oSentTickets:Lcom/glympse/platform/common/SentTicketList;

    iget-object v2, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    iget-object v2, v2, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->m_oTicket:Lcom/glympse/platform/common/Ticket;

    invoke-virtual {v1, v2}, Lcom/glympse/platform/common/SentTicketList;->ExpireTicket(Lcom/glympse/platform/common/Ticket;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 628
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v1}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    .line 634
    :cond_4
    :try_start_0
    iget-object v1, p0, Lcom/glympse/android/glympse/ViewHistory$TicketCell$OnExpireDelete;->this$1:Lcom/glympse/android/glympse/ViewHistory$TicketCell;

    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v2

    invoke-static {v1, v2, v3}, Lcom/glympse/android/glympse/ViewHistory$TicketCell;->access$0(Lcom/glympse/android/glympse/ViewHistory$TicketCell;J)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 636
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 638
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method
